<!-- 预定 -->
<template>
  <view class="pingjia_info">
    <view class="info_left">
      <image :src="config.imgUrl + 'liveAction/good.jpg'" />
      <view class="number">
        <view class="good_percent">{{ pingjiaInfo.goodPercent }}%</view>
        <view>好评率</view>
      </view>
    </view>
    <view class="info_right number">
      <view class="pingjia_count"
        >共有{{ pingjiaInfo.pingjiaCount }}条评价</view
      >
      <view class="order_count"
        >{{
          pingjiaInfo.orderCount > 999 ? "999+" : pingjiaInfo.orderCount
        }}人次购买</view
      >
    </view>
  </view>
</template>

<script>
import config from "@/config";
export default {
  props: {
    pingjiaInfo: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {
      config,
    };
  },
};
</script>

<style lang="scss" scoped>
.pingjia_info {
  margin: 0 auto;
  width: 686rpx;
  height: 96rpx;
  background: linear-gradient(
    270deg,
    rgba(14, 149, 137, 0.1) 0%,
    rgba(14, 149, 137, 0) 100%
  );
  border-radius: 4rpx;
  padding: 8rpx 0;
  display: flex;
  align-items: center;

  .info_left {
    height: 80rpx;
    flex: 1;
    font-size: 20rpx;
    font-weight: 400;
    color: #999999;
    display: flex;
    align-items: center;
    border-right: 2rpx solid rgba(0, 0, 0, 0.08);

    image {
      width: 64rpx;
      height: 64rpx;
      margin-right: 14rpx;
    }

    .good_percent {
      font-size: 28rpx;
      font-weight: 500;
      color: #ffaf24;
    }
  }

  .info_right {
    margin-left: 28rpx;
    height: 80rpx;
    flex: 2;
    font-size: 24rpx;
    font-weight: 400;
    color: #333333;

    .pingjia_count {
    }

    .order_count {
      font-size: 20rpx;
      color: #999999;
    }
  }
}

.number {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-around;
}
</style>
